﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AcademySystem.DAL;

namespace AcademySystem.Service.DTO
{
    public class SubscriptionDTO
    {
        public CourseDTO Course { get; set; }
        public DateTime SubscriptionDate { get; set; }

        public static SubscriptionDTO CreateSubscriptionDTO(Subscription subscription)
        {
            SubscriptionDTO subscriptionDto = new SubscriptionDTO()
            {
                Course = CourseDTO.CreateCourseDTO(subscription.Course),
                SubscriptionDate = subscription.SubscriptionDate
            };

            return subscriptionDto;
        }
    }
}